<!DOCTYPE html>
<html>
<head>
<#include "WEB-INF/view/_frag/meta.ftl">
<#include "WEB-INF/view/_frag/jscss.ftl">
<title>角色管理</title>
</head>
<body>
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>系统管理<span class="c-gray en">&gt;</span> 角色管理 <a class="btn btn-success radius r" style="line-height: 1.6em; margin-top: 3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
	<form action="${basePath}/role/list" method="post" class="form form-horizontal">
		<div class="text-c">
			<input type="text" name="role.role_name" value="${role.role_name}" placeholder=" 角色名称" style="width: 250px" class="input-text" />
			<button type="submit" class="btn btn-success radius">
				<i class="Hui-iconfont">&#xe665;</i> 搜索
			</button>
		</div>
	</form>
	 
	<div class="cl pd-5 bg-1 bk-gray mt-20">
		<span class="l"> <a class="btn btn-primary radius" onclick="location.href='${basePath}/role/oper'" href="javascript:;"> <i class="Hui-iconfont">&#xe600;</i> 添加角色
		</a></span>
	</div>
	 
	<div class="pd-5 mt-20">
		<table id="project_list" class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c">
						 <th>序号</th>
					     <th>角色名称</th>
				         <th>操作</th>
				</tr>
			</thead>
			<tbody>
				<#list page.dataList as data>
				<tr class="text-c">
					<td>${data_index+1}</td>
					<td>${data.role_name}</td>	
					<td>
					<#if data.role_id !=1></#if>
						 
						<a title="编辑" class="ml-5" style="text-decoration: none" onclick="location.href='${basePath}/role/oper?role.role_id=${data.role_id}'"><i class="Hui-iconfont">&#xe6df;</i></a>
      		 			 
      		 			 
      		 			<a title="分配权限" class="ml-5" style="text-decoration: none" onclick="location.href='${basePath}/role/toperm?role.role_id=${data.role_id}'" ><i class="Hui-iconfont">&#xe681;</i></a>
       				    
       				   
       				    <a title="删除" href="javascript:;" onclick="del('${data.role_id}')" class="ml-5" style="text-decoration: none"><i class="Hui-iconfont">&#xe6e2;</i></a>
       					 
       				</td>
				</tr>
				</#list>
			</tbody>
		</table>
	</div>
	<div class="pd-5 mt-20" id="jsPage"></div>
</div>

<script type="text/javascript">
	${page.jsPage}

	$('#project_list').dataTable({
		//"aaSorting" : [ [ 14, "项目编号" ] ],//默认第几个排序
		"bStateSave" : true,//状态保存
		"pading" : false,
		"aoColumnDefs" : [
		//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
		{
			"orderable" : false,
			"aTargets" : [ 2]
		} // 不参与排序的列
		],
		"bLengthChange" : false,
		"bInfo" : false,
		"bPaginate" : false,
	});
	
	function del(id) {
		layer.confirm('确定要删除吗？', {
			btn : [ '确定', '取消' ]
		}, function() {
			window.location.href = '${basePath}/role/delete?role.role_id=' + id;
		}, function() {
		});
	}
</script>

</body>
</html>